

package com.icloud.framework.domain.model;

import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;

import javax.persistence.MappedSuperclass;
import javax.persistence.Version;
import java.util.Date;

@MappedSuperclass
public class AuditingEntity extends AbstractEntity {

    @CreatedDate
    private Date createdAt;

    @CreatedBy
    private String createdBy;

    @LastModifiedDate
    private Date lastModifiedAt;

    @LastModifiedBy
    private String lastModifiedBy;

    @Version
    private int version;

    protected AuditingEntity() {
        super();
    }

    protected AuditingEntity(String id) {
        super(id);
    }


}
